$(document).ready(function(){ 
			/*init data*/
			var $winWidth = $(window).width();
			var $winHeight = $(window).height();
			$('.invent_overlay_content').css('margin-left',$winWidth/2-200);
			$('.invent_overlay_bg').css('opacity',0.8);
			
			function windowResize (){
				var $winWidth = $(window).width();
				var $winHeight = $(window).height();
				$("#container").css('min-height',$winHeight*3/5-75);
				$('.invent_overlay_content').css('margin-left',$winWidth/2-200);
				
				
				
			}
			$(window).resize(function(){
				windowResize();
				});
			
			/* 时钟设置开始 */
				var optionsChina = {
      				utc: true,
      				utcOffset:8,
      				/* timeout: 60000, */
	    			format: '%H:%M:%S'
      				};
      			$('#bjtime').jclock(optionsChina);
			/* 时钟设置结束 */
      		
      			/*container min-height*/
      			$("#container").css('min-height',$winHeight*3/5-75);
      			
      			/* 照片墙开始 */	
    			var $container = $('#container');
				$container.imagesLoaded( function(){
						$container.masonry({
  						itemSelector : '.box',
    					columnWidth: 5,
    					isAnimated: true});
				});
			/* 照片墙结束 */
				/*weibo trend dismiss btn*/
				 $(function() {
						/*dismiss btn*/
						var $dismissbtn = $('.trend_list');
						$dismissbtn.children('li').each(function(){
							var $this = $(this);
							
							$this.bind('mouseenter',function(){
								$this.find('.dismiss').fadeIn();
							}).bind('mouseleave',function(){
								$this.find('.dismiss').fadeOut();
							});

						});	
						/*friend_trendbox_btns*/
						var $friend_trend = $('#friend_trend');
						
						$friend_trend.children('ul').each(function(){
							var $this = $(this);
							$this.bind('mouseenter',function(){
								$this.find('.friend_trendbox_btns').fadeIn();
							}).bind('mouseleave',function(){
								$this.find('.friend_trendbox_btns').fadeOut();
							});
						});
						
		            });
				$('.invent_overlay_bg').click(function(){
					$('.invent_overlay').fadeOut();
					$('.invent_trendbox').html('');
					$('.invent_overlay2').fadeOut();
					$('.invent_trend_name').html('话题名称:&nbsp;');
					$('.invent_text span').html('');
				})
				
			
				 
				/* weibo app照片墙开始 */	
    			var $container_weibo = $('#friend_trend');
				$container_weibo.imagesLoaded( function(){
						$container_weibo.masonry({
  						itemSelector : '.box',
    					columnWidth: 5,
    					isAnimated: true});
				});
			
			/* weibo app照片墙结束 */

	 $('.tag_thumb').fancybox({
					
					helpers : {
						
						title : {
							type : 'inside'
						},
						buttons	: {
							position:'bottom'}
					},
	               afterLoad : function() {
						this.title = '<div class="tag_button"><a href="'+(this.title ? '  ' + this.title : '')+'">点击查看此专辑</a></div>'  ;
					}
				});
	/*微博app-时间线tab*/		
	 $('#submit_trend').tabify();		
	 $('#friends_trend').tabify();
	 /*weibo_app friend_list*/
	 $friends_list = $('.friends_list');
	 $list_more = $('.list_more');
	 $f_list_height = $friends_list.height();
	 if($f_list_height < 100){
		 $list_more.css('display','none');
	 }else{
		 $list_more.click(function(){
			 
			 $friends_list.animate(
					 { maxHeight:2000},1000);
		 
		 });
		}
	
	 
	
	 
	});		
